<template>
	<!-- 头部组件 -->
	<view class="header" 
	:style="{'paddingTop':top+'px','height':height + 'px','lineHeight':height + 'px'}"
	>
		寻物小站
	</view>
</template>

<script setup>
import { onBeforeMount, ref } from 'vue';
import {getHeaderHeight,getHeaderTop} from '@/utils/getHeaderInfo.js';

const top = ref() 
const height = ref() 

function init(){
	top.value = getHeaderTop();
	height.value = getHeaderHeight();
	// console.log(height.value);
}

// 在挂载之前
onBeforeMount(()=>{
	init();
})
</script>

<style lang="scss" scoped>
.header{
	width: 100%;
	text-align: center;
	font-size: 38rpx;
	color: #333333;
	margin-bottom: 10rpx;
	// background-color: #81d3f8;
}
</style>